<template>
  <div>
    <span>用户名</span>
    <!-- v-model不识别 value checked -->
    <input type="text" name="username" v-model.lazy='username'  value='123344'/><br />
    <!-- <input type="checkbox" v-model="flag" checked /> -->
    <span>{{ username }}</span>
    <!-- <button @click="fn">点击</button> -->
  </div>
</template>

<script>
export default {
  //该vue组件的数据源
  data() {
    return {
      username: '',
      flag: false,
    }
  },
  methods: {
    fn() {
      //  console.log(this.username);
       console.log(this.username.length)
    },
  },
}
</script>

<style lang='less'></style>